# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=plasma-pass
pkgver=1.2.0
pkgrel=1
pkgdesc="Plasma applet for the Pass password manager"
# armhf blocked by qt5-qtdeclarative
# s390x and riscv64 blocked by polkit -> plasma-framework
arch="all !armhf !s390x !riscv64"
url="https://kde.org/plasma-desktop/"
license="LGPL-2.1-or-later"
makedepends="
	extra-cmake-modules
	gpgme-dev
	ki18n-dev
	kitemmodels-dev
	oath-toolkit-dev
	plasma-framework-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samurai
	"

source="https://download.kde.org/stable/plasma-pass/plasma-pass-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4ac72af97a8026022459c46eb3d8dec1489dedf0ea47ab8c71a5ab92a9c5e2faca92ef2ed512e5cd0cc181a6aa7b6ab802ae98ce525e97818704e0bf58e4603a  plasma-pass-1.2.0.tar.xz
"
